package com.ruoyi.teacher.api.factory;


import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.teacher.api.domain.TeaTeachers;
import com.ruoyi.teacher.api.teacherFeignClient;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class teacherFallback implements FallbackFactory<teacherFeignClient> {
    @Override
    public teacherFeignClient create(Throwable cause) {
        return new teacherFeignClient() {
            @Override
            public AjaxResult add(TeaTeachers teaTeachers) {
                return  AjaxResult.error("添加失败");
            }
        };
    }
}
